import { createStore } from 'vuex'

const modulesFiles = import.meta.globEager('./modules/**/*.ts')
const modules = {}
for (const key in modulesFiles) {
  modules[key.replace(/(\.\/modules\/|\.ts)/g, '')] = modulesFiles[key].default
}

export default createStore<any>({
  modules
})